#include "stdio.h" 
#include <dirent.h>
void main() { 
	DIR *dirp; 
	struct dirent *dp;
	dirp = opendir("./"); //打开目录指针
	while ((dp = readdir(dirp)) != NULL) { //通过目录指针读目录
		printf("%s\n", dp->d_name );
	}
	 (void) closedir(dirp); //关闭目录
}
